const express = require("express");
const router = express.Router();
const context = require("./context");

router.post("/api/register", (req, res) => context.registerRouter(req, res));
router.post("/api/login", (req, res) => context.loginRouter(req, res));
router.post("/api/changeUser", (req, res) =>
  context.changeUserRouter(req, res)
);
router.post("/api/changeAvatar", (req, res) =>
  context.changeAvatarRouter(req, res)
);
router.post("/api/music", (req, res) => context.musicRouter(req, res));
router.get("/api/photowall", (req, res) => context.photowallRouter(req, res));
router.post("/api/mdEdit", (req, res) => context.mdEditRouter(req, res));
router.post("/api/mdImg", (req, res) => context.mdImgRouter(req, res));
router.get("/api/labels", (req, res) => context.labelsRouter(req, res));
router.post("/api/getMd", (req, res) => context.sendMdRouter(req, res));
router.post("/api/delMd", (req, res) => context.delMdRouter(req, res));
router.get("/api/changeMdInfo", (req, res) =>
  context.changeMdInfoRouter(req, res)
);
router.post("/api/getLabelInfo", (req, res) =>
  context.getLabelInfoRouter(req, res)
);
router.post("/api/addComment", (req, res) =>
  context.commentRouter.addComment(req, res)
);

router.get("/api/getComment", (req, res) =>
  context.commentRouter.getComment(req, res)
);

module.exports = router;
